import React from 'react';
import ReactDOM from 'react-dom'
import {Button} from 'antd'
import { BrowserRouter, Route, Switch, Link, } from 'react-router-dom'
import { createStore,applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import logger from 'redux-logger'

import Main from './container/main/main';
import Manager from './container/manager/manager';
import reduxor from './redux'

const store = createStore(reduxor, applyMiddleware(thunk, logger))

function App () {
    return (
        <Provider store={store}>
        <BrowserRouter>
            <div>
                <Switch>
                    <Route path="/manage" component={Manager} />
                    <Route component={Main} />
                </Switch>
            </div>
        </BrowserRouter>
        </Provider>
    )
}

ReactDOM.render(<App/>, document.getElementById('root'))